//
//  ActiveAreaTableViewCell.m
//  高仿萝卜书摘
//
//  Created by 谢俊逸 on 2016/11/22.
//  Copyright © 2016年 谢俊逸. All rights reserved.
//
#import "ActiveAreaCollectionView.h"
#import "ActiveAreaTableViewCell.h"
#import "XJYHeader.h"
@interface ActiveAreaTableViewCell()
@property (strong, nonatomic) IBOutlet ActiveAreaCollectionView *collectionView;

@end


#define collectionViewCellID @"collectionViewCellID"

@implementation ActiveAreaTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];

    UIImage *image1 = [UIImage imageNamed:@"section1-1.jpj"];
    UIImage *image2 = [UIImage imageNamed:@"section1-2.jpj"];
    NSArray *array = @[image1, image2];
        
    [self setupCollectionViewWithFrame:CGRectMake(0, 0,  ScreenW, 200) imageArray:array itemSize:CGSizeMake((ScreenW-30)/2, 150)];

}


- (void)setupCollectionViewWithFrame:(CGRect)frame imageArray:(NSArray *)imageArray itemSize:(CGSize)itemSize{

    ActiveAreaCollectionView *collectionView = [[ActiveAreaCollectionView alloc] initWithFrame:frame collectionViewItemSize:itemSize withImageArr:imageArray];
    [self.contentView addSubview:collectionView];

}






- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
